body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
}

.container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 550px;
    width: 90%;
    overflow: hidden;
    position: relative;
    padding-bottom: 50px;
}

header h1 {
    font-family: 'Pacifico', cursive;
    color: #c82a2a;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

header p {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.output-area {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 10px;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
    aspect-ratio: 1 / 1;
    padding: 10px;
    box-sizing: border-box;
}

#generated-image {
    display: none;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
    animation: fadeInScale 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.output-area .placeholder {
    color: #999;
    font-style: italic;
    font-weight: normal;
    font-size: 1.2em;
    text-align: center;
    padding: 20px;
    display: block;
    word-break: break-word;
}

.output-area .placeholder.error {
    color: #c82a2a;
    font-style: normal;
    font-weight: bold;
}

.output-area .content {
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#generate-btn {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, #008c45, #007a3d);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    display: inline-block;
    margin-top: 10px;
    margin-bottom: 15px;
}

#generate-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #007a3d, #006b33);
}

#generate-btn:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

#generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #8a8a8a, #7a7a7a);
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #555;
    font-size: 0.9em;
    width: auto;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border-left-color: #c82a2a;
    animation: spin 1s ease infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
}

.flag {
    display: flex;
    width: 100%;
    height: 100%;
}

.flag div {
    flex: 1;
    height: 100%;
}

.flag .green {
    background-color: #008c45;
    border-bottom-left-radius: 15px;
}

.flag .white {
    background-color: #f4f5f0;
}

.flag .red {
    background-color: #cd212a;
    border-bottom-right-radius: 15px;
}

.output-area.loading #generated-image {
    filter: blur(3px) grayscale(30%);
    opacity: 0.7;
}